import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * demo模块-用户信息
 */
@Entity('demo_user_info')
export class DemoUserInfoEntity extends BaseEntity {
  @Index()
  @Column({ comment: '姓名', length: 50 })
  name: string;

  @Index()
  @Column({ comment: '昵称', length: 50 })
  nickname: string;

  @Column({ comment: '抖音', length: 50,nullable: true })
  dyNum: string;

  @Column({ comment: '微信', length: 50,nullable: true })
  wxNum: string;

  @Column({ comment: '头像', nullable: true })
  avatar: string;

  @Column({ comment: '类型 0-内部 1-外部', default: 0, type: 'tinyint' })
  source: number;

  @Column({ comment: '主播标签' })
  labels: string;

  @Column({ comment: '主播标签名称' })
  labelsName: string;

  @Column({ comment: '图片', nullable: true, type: 'json' })
  image: string[];

  @Column({ comment: '直播时长', type: 'int' })
  liveDuration: number;

  @Column({ comment: '音浪', type: 'int' })
  soundWave: number;

  @Column({ comment: '礼物数', type: 'int' })
  giftCount: number;

  @Column({ comment: '单量', type: 'int' })
  orderCount: number;

  @Column({ comment: '单价', type: 'decimal', precision: 10, scale: 2 })
  unitPrice: number;

  @Column({ comment: '介绍', type: 'text', nullable: true })
  introduction: string;
}
